<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui" template="/paginas/template.xhtml">

	<ui:define name="corpoForm">
		
		<h:form id="formEditarColecao" prependId="false">

			<p:panelGrid columns="2" styleClass="botoes" id="botoes">
				<p:commandButton value="#{rsc.label_salvar}" styleClass="botao"
					action="#{manterColecaoBean.alterar}" ajax="false"
					onclick="setTimeout('document.getElementById(\'' + this.id + '\').disabled=true;', 50);"
					rendered="#{p:ifGranted('ALTERAR_COLECAO')}"
					title="#{rsc.title_alterar}" />

				<p:commandButton value="#{rsc.label_cancelar}" styleClass="botao"
					update="growl" action="#{manterColecaoBean.cancelar}" ajax="false"
					onclick="setTimeout('document.getElementById(\'' + this.id + '\').disabled=true;', 50);"
					title="#{rsc.title_cancelar}" immediate="true">
				</p:commandButton>
			</p:panelGrid>

			<p:panel id="pnlInfo" header="#{rsc.label_alterarColecao}"
				toggleable="true" toggleSpeed="500">

				<p:panelGrid columns="2">
					<p:outputLabel value="#{rsc.label_colecao}" for="txtColecao"
						styleClass="obrigatorio" />

					<p:inputText label="#{rsc.label_colecao}" id="txtColecao"
						maxlength="60" size="60" title="#{rsc.label_colecao}"
						value="#{manterColecaoBean.entidade.nome}" />

					<p:outputLabel value="#{rsc.label_ativo}" for="chkAtivo" />

					<p:selectBooleanCheckbox label="#{rsc.label_ativo}" id="chkAtivo"
						title="#{rsc.label_ativo}"
						value="#{manterColecaoBean.entidade.ativo}" />

				</p:panelGrid>
				<p:watermark value="#{rsc.wm_nomeColecao}" for="txtNomeColecao" />
			</p:panel>

		</h:form>
	</ui:define>
</ui:composition>

